﻿$(document).ready(function () {
    if ($("#result").html() == "添加成功" || $("#result").html() == "修改成功") {
        //$("#submitBtn").attr('disabled', 'disabled');//设置disabled属性为true，按钮不可用 
        //$("#submitBtn").css('background', '#ccc');
        //关闭当前对话框并刷新父页面
        $(window.top.document).find("#refreshBtn").click();
        window.top.art.dialog.get('systemmanagedictionarycreate').close();
    }

    $("#subMenu #createBtn").click(function () {
        //var dicId = $("#tablelist tbody tr").attr("id");
        var dicId = $("#top_menu .selectedNav").attr("id");
        var url = $(this).attr("data-href")+"/"+dicId;
        if (url != null && url != "") {
            artDialogForm(url, "新增字典", "systemmanagedictionarycreate", 500, 230);
        }
    });
    $("#subMenu #refreshBtn").click(function () {
        var item = $("#top_menu .selectedNav").attr("id");
        $("#subContent .rightContent").load("/Dictionary/Index/"+item);
    });
});